<html>
<head></head>
<body>
<div class="col-sm-12">
    <div class="animated fadeIn">
        <div class="col-lg-4">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>菜单管理 <small>菜单列表</small></h5>
                    <div class="ibox-tools">
                        <a class="" href="javascript:Resource.refresh()">
                            <i class="fa fa-refresh" title="缓存刷新"></i>
                        </a>
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div id="resourceTree" class="ztree"></div>
                </div>
            </div>
        </div>
        <div class="col-lg-8">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>菜单与资源</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form method="post" class="form-horizontal" action="upms/resource/" id="resourceForm">
                        <input type="hidden" name="id"/>
                        <input type="hidden" name="pid"/>
                        <div class="form-group"><label class="col-sm-2 control-label">资源名称<span class="required text-danger">*</span></label>
                            <div class="col-sm-10"><input type="text" class="form-control" name="name"   placeholder="Resource Name" /></div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group"><label class="col-sm-2 control-label">图标</label>
                            <div class="col-sm-10"><input type="text" class="form-control" name="icon"  placeholder="Icon" onclick="Resource.initFontBox()"/></div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group"><label class="col-sm-2 control-label">排序</label>
                            <div class="col-sm-10"><input type="text" class="form-control" name="seq" placeholder="Seq" /></div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group"><label class="col-sm-2 control-label">类型<span class="required text-danger">*</span></label>
                            <div class="col-sm-10">
                                <div class="md-radio-inline">
                                    <div class="md-radio">
                                        <#list resourceType as type>
                                        <input type="radio" id="type-${type.getCode()}" name="type"
                                               value="${type.getCode()}"
                                               class="md-radiobtn">
                                        <label for="type-${type.getCode()}">
                                            <span class="check"></span>
                                            <span class="box"></span>${type.getName()}</label>
                                        </#list>
                                </div>
                            </div>
                        </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group"><label class="col-sm-2 control-label">URL<span class="required text-danger">*</span></label>
                    <div class="col-sm-10"><textarea class="form-control" id="resourceUrl" name="url" placeholder="Url" ></textarea></div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group"><label class="col-sm-2 control-label">描述</label>
                    <div class="col-sm-10"><textarea class="form-control" name="remark" id="description" placeholder="Description" ></textarea></div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <button type="submit" class="btn btn-primary">提交</button>
                        <button type="reset" class="btn btn-default">重置</button>
                    </div>
                </div>
                </form>
            </div>
        </div>
    </div>
    </div>
</div>
<div id="fontawsonme"></div>
<!--End-span12-->
<script src="${ctx}/public/js/business/Resource.js"></script>
<script>
    $(function () {
        Resource.initTree('#resourceTree');
        Resource.initFormValidation('#resourceForm');
    });
</script>
</body>
</html>
